import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import { Link } from 'react-router-dom';
import UserStore from '../store/User';

class Logout extends Component {
    async componentDidMount() {
        await UserStore.logout();
        window.location.href = "/";
    }
    render() {
        return null;
    }
}

Logout.propTypes = {
    history: PropTypes.object
}

export default Logout;